package com.cxf.windex.enums;

public enum StatusEnum {
  NORMAL("0", "正常"),
  PAYSUCCESS("1", "支付成功"),
  PAYING("2", "支付中"),
  PAYFAIL("-1", "支付失败"),
  FAIL("-2", "异常");

  private final String key;
  private final String desc;

  private StatusEnum(String key, String desc) {
    this.key = key;
    this.desc = desc;
  }

  public static StatusEnum getIdType(String idType) {
    StatusEnum[] its = values();
    StatusEnum[] arr$ = its;
    int len$ = its.length;

    for(int i$ = 0; i$ < len$; ++i$) {
      StatusEnum it = arr$[i$];
      if (it.getKey() .equals( idType)) {
        return it;
      }
    }

    return NORMAL;
  }

  public String getKey() {
    return this.key;
  }

  public String getDesc() {
    return this.desc;
  }
}
